package com.atstudy.bz;

/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2022/12/21 10:54
 * @copyright: 博为峰
 */
public class IntegerDemo {
    public static void main(String[] args) {
        System.out.println(Integer.MAX_VALUE);
        System.out.println(Integer.MIN_VALUE);

        //自动装箱
        Integer a = 9;
        a = a + 1;//自动拆箱

        int b = Integer.parseInt("6");


        //机制
        System.out.println(Integer.toBinaryString(5)); //二进制 101
        System.out.println(Integer.toOctalString(5));//八进制
        System.out.println(Integer.toHexString(5));//十六进制

        //面试题  自动装箱 小于一个字节，创建一个对象
        Integer x = 128;
        Integer y = 128;
        System.out.println(x == y);
        System.out.println(x.equals(y));

    }
}
